/*
package com.zlx.mall.basic.quartz;

import com.zlx.mall.basic.util.concurrent.ThreadUtil;
import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
import org.springframework.lang.NonNull;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.util.concurrent.TimeUnit;

*/
/**
 * @author qingke
 **//*

@Slf4j(topic = "quartzLogger")
@DisallowConcurrentExecution
@PersistJobDataAfterExecution
public class ExampleJob extends QuartzJobBean {

    @Override
    protected void executeInternal(@NonNull JobExecutionContext ctx) throws JobExecutionException {
        try {
            log.info("Example Job Start.");
            JobDataMap dataMap = ctx.getMergedJobDataMap();

            if (dataMap.getBooleanValue("error")) {
                log.error("### Throw Exception.");
                throw new JobExecutionException("Example Job Test Exception");
            } else {
                ThreadUtil.sleep(TimeUnit.SECONDS.toSeconds(10));
            }

            log.info("Example Job Stop.");
        } catch (Exception e) {
            throw new JobExecutionException(e);
        }
    }
}
*/
